package com.yw.smartcityforjava.api;

import com.yw.smartcityforjava.api.allservices.ServicesResponse;
import com.yw.smartcityforjava.api.homeBanner.HomeBannerResponse;
import com.yw.smartcityforjava.api.login.LoginRequest;
import com.yw.smartcityforjava.api.login.LoginResponse;
import com.yw.smartcityforjava.api.news.NewsListRes;
import com.yw.smartcityforjava.api.news.NewsTypeResponse;
import com.yw.smartcityforjava.api.register.RegisterRequest;
import com.yw.smartcityforjava.api.register.RegisterRes;
import com.yw.smartcityforjava.api.user.UserInfoRes;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface Api {


    @POST("/prod-api/api/login")
    Call<LoginResponse> login(@Body LoginRequest loginRequest);

    @POST("/prod-api/api/register")
    Call<RegisterRes> register(@Body RegisterRequest registerRequest);

    @GET("/prod-api/api/rotation/list")
    Call<HomeBannerResponse> loadHomeBanner();

    @GET("/prod-api/api/service/list")
    Call<ServicesResponse> loadAllServices();

    @GET("/prod-api/press/category/list")
    Call<NewsTypeResponse> loadNewsTypeList();

    @GET("/prod-api/press/press/list")
    Call<NewsListRes> loadNewsList(@Query("type") int type);

    @GET("/prod-api/api/common/user/getInfo")
    Call<UserInfoRes> loadUserInfo(@Header("Authorization") String token);


}

